package com.fwtai.web;

import com.fwtai.bean.PageFormData;
import com.fwtai.datasource.DaoHandle;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.HashMap;

/**
 * 反馈建议访问数据库
 * @作者 田应平
 * @版本 v1.0
 * @创建时间 2021-09-06 12:12:31
 * @QQ号码 444141300
 * @Email service@yinlz.com
 * @官网 <url>http://www.fwtai.com</url>
*/
@Repository
public class FeedbackDao{

    @Resource
    private DaoHandle dao;

    public String queryExistById(final String kid){
        return dao.queryForString("feedback.queryExistById",kid);
    }

    public int edit(final PageFormData formData){
        return dao.execute("feedback.edit",formData);
    }

    public HashMap<String,Object> queryById(final String kid){
        return dao.queryForHashMap("feedback.queryById",kid);
    }

    public int delById(final String kid){
        return dao.execute("feedback.delById",kid);
    }

    public HashMap<String,Object> listData(final PageFormData formData){
        return dao.queryForPage(formData,"feedback.listData","feedback.listTotal");
    }
}